Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #71: Deprecate CsrfMiddleware in favor of CsrfTokenMiddleware #71

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

ev-gor
Copy link
Contributor

@ev-gor ev-gor commented Oct 31, 2024

Q A
Is bugfix?
New feature?
Breaks BC?

Fix #70

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5d18903) to head (c22652a).
Report is 13 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master       #71   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity        47        61   +14     
===========================================
  Files              8         9    +1     
  Lines            128       166   +38     
===========================================
+ Hits             128       166   +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ev-gor ev-gor force-pushed the class-deprecation branch from 82339ad to 32894f7 Compare October 31, 2024 15:19
@ev-gor
Copy link
Contributor Author

ev-gor commented Oct 31, 2024

I just copy/paste existing code, but I can add missing tests if needed

@vjik vjik requested a review from a team October 31, 2024 19:18
@vjik vjik added the status:code review The pull request needs review. label Oct 31, 2024
@samdark
Copy link
Member

samdark commented Nov 1, 2024

@ev-gor deprecated class could be excluded from testing.

@ev-gor ev-gor force-pushed the class-deprecation branch from 0945101 to decf6f6 Compare November 1, 2024 15:26
@vjik
Copy link
Member

vjik commented Nov 2, 2024

@ev-gor deprecated class could be excluded from testing.

Why? It's reduced code coverage. I suggest removing tests for deprecate classes at the time of their deletion.

@samdark
Copy link
Member

samdark commented Nov 3, 2024

Alright. @vjik suggestion makes sense.

@ev-gor ev-gor force-pushed the class-deprecation branch from 7d98cac to c22652a Compare November 6, 2024 23:01
@ev-gor
Copy link
Contributor Author

ev-gor commented Nov 6, 2024

OK, I added tests for the new class and left tests for the deprecated one but with prefix 'Deprecated' in their names to make it easier to remove them in the future.

@samdark samdark changed the title Fix #70: Deprecate CsrfMiddlware class and add CsrfTokenMiddleware instead Fix #71: Deprecate CsrfMiddleware in favor of CsrfTokenMiddleware Nov 7, 2024
@samdark samdark merged commit 38ea3c5 into yiisoft:master Nov 7, 2024
26 checks passed
@samdark
Copy link
Member

samdark commented Nov 7, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename CsrfMiddlware to CsrfTokenMiddleware
3 participants